<?php
	include 'connect.php';
    if (is_numeric($_GET['sug_id'])) {  
        $id = $_GET['sug_id'];
        $nome = mysql_real_escape_string(htmlspecialchars($_POST['nome']));
        $url = mysql_real_escape_string(htmlspecialchars($_POST['url']));
        mysql_query("UPDATE suggested SET sug_nome='$nome', sug_url='$url' WHERE sug_id='$id'") or die(mysql_error()); 
        echo '<script language=javascript>document.location.href="./../suggested.php"</script>';
    }
?>